New distributed algorithms for fast sign detection in residue number systems (RNS)
نویسندگان
چکیده
We identify a canonical parameter in the Chinese Remainder Theorem (CRT) and call it the ‘‘Reconstruction Coefficient’’, (denoted by ‘‘RC ’’); and introduce the notions of ‘‘Partial’’ and ‘‘Full’’ Reconstruction. If the RC can be determined efficiently, then arithmetic operations that are (relatively) harder to realize in RNS; including Sign Detection, Base change/extension and Scaling or division by a constant can also be implemented efficiently. This paper therefore focuses on and presents two distinct methods to efficiently evaluate the RC at long wordlengths. A straightforward application of these methods leads to ultra-fast sign-detection. An independent contribution of this paper is to illustrate non-trivial trade-offs between run-time computation vs. pre-computation and look-up. We show a simple method to select the moduli which leads to both the (i) number of RNS channels n; as well as (ii) the largest channel modulus mn satisfying {O(n) , O(mn)} / N ≡ the full-precision bit-length. The net result is that formany canonical operations; exhaustive look-up covering all possible input values is feasible even at long cryptographic bit-lengths N . Under fairly general and realistic assumptions about the capabilities of current hardware, the memory needed for exhaustive look-up tables is shown to be bounded by a low degree polynomial of n. Moreover, both methods to compute RC can achieve a delay of O(lg n) in a RN system with n channels. To the best of our knowledge, no other method published to date has shown a path to achieve that lower bound on the execution delay. Further, small values of channel moduli make it ideal to implement each individual RNS channel on a simple core in a many-core processor or as a distributed node, and our algorithms require a limited number of inter-channel communications, averaging O(n). Results from a multi-core GPU implementation corroborate the theory. © 2016 Elsevier Inc. All rights reserved. 1. Notation and definitions A residue number system (RNS) uses a set M of pairwise coprime positive integers called the moduli-set: M = {m1,m2, . . . ,mr , . . . ,mn} (1) ∗ Corresponding author. E-mail address: [email protected] (D.S. Phatak). http://dx.doi.org/10.1016/j.jpdc.2016.06.005 0743-7315/© 2016 Elsevier Inc. All rights reserved. where each component-modulus mr > 1 ∀r ∈ [1, n] and gcd(mi,mj) = 1 for i ≠ j. For convenience, we assume mi < mj if i < j. The number of residue channels n is the cardinality of the moduli-set: n ≡ |M| = number of moduli. The total modulusM is the product of all moduli in the moduliset: M = m1 × m2 × · · · × mn. Every integer Z ∈ [0,M − 1] can be uniquely represented by a touple/vector of its residues (remainders) w.r.t (with respect to) D.S. Phatak, S.D. Houston / J. Parallel Distrib. Comput. 97 (2016) 78–95 79 each component modulus: Z ←→ Z = [z1, z2, . . . , zn], where (2) zr = (Z mod mr), r = 1, . . . , n. (3) The RNS full-precision is defined as N base-b digits, where N = ⌈logb M⌉ and b is the radix (or base) of the original representation of the integer Z . Conversion from residues back to an integer is done using the Chinese Remainder Theorem (CRT) as follows: Z = (ZT mod M) where (4)
منابع مشابه
An Approximate Sign Detection Method for Residue Numbers and its Application to RNS Division
we present new division algorithms for Residue Number System (RNS). The algorithms are based on a sign estimation procedure that computes the sign of a residue number to be positive, negative, or indeterminate. In the last case, magnitude of the number is guaranteed to be in a limited interval whose size is related to the cost of the sign estimation process. Our division algorithms resemble SRT...
متن کاملOverflow Detection in Residue Number System, Moduli Set {2n-1,2n,2n+1}
Residue Number System (RNS) is a non-weighted number system for integer number arithmetic, which is based on the residues of a number to a certain set of numbers called module set. The main characteristics and advantage of residue number system is reducing carry propagation in calculations. The elimination of carry propagation leads to the possibility of maximizing parallel processing and reduc...
متن کاملUsing both Binary and Residue Representations for Achieving Fast Converters in RNS
In this paper, a new method is introduced for improving the efficiency of the Residue Number System, which uses both binary and residue representations in order to represent a number. A residue number system uses the remainder of the division in several different modules. Conversion of a number to smaller ones and carrying out parallel calculations on these numbers greatly increase the speed of...
متن کاملEfficient Fast Sign Detection Algorithm for the RNS Moduli Set
This brief presents a fast sign detection algorithm for the residue number system moduli set {2 n+1 − 1, 2 n − 1, 2 n }. First, a sign detection algorithm for the restricted moduli set is described. The new algorithm allows for parallel implementation and consists exclusively of modulo 2n additions. Then, a sign detection unit for the moduli set {2 n+1 − 1, 2 n − 1, 2 n } is proposed based on t...
متن کاملFast Sign Detection Algorithm for the RNS Moduli Set 2n+1-1, 2n-1, 2n
This brief presents a fast sign detection algorithm for the residue number system moduli set {2n+1 − 1, 2n − 1, 2n}. First, a sign detection algorithm for the restricted moduli set is described. The new algorithm allows for parallel implementation and consists exclusively of modulo 2n additions. Then, a sign detection unit for the moduli set {2n+1 − 1, 2n − 1, 2n} is proposed based on the new s...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Parallel Distrib. Comput.
دوره 97 شماره
صفحات -
تاریخ انتشار 2016